1. Field of Art
This application generally relates to a tool for analyzing software. More particularly, it relates to displaying stack trace information.
2. Description of the Related Art
Each time a software application performs a function call, information about the call is generated. That information generally includes the location of the call in the application, the arguments of the call, and the local variables of the function being called. The information is stored in a block of data called a stack frame. Stack frames are allocated in a region of memory called the call stack. The call stack is divided into contiguous pieces called stack frames or, simply, frames. Each frame includes the data associated with one call to one function. The frame contains the arguments given to the function, the function's local variables, and the address at which the function is executing. The concept of the stack frame is well known to those of skill in the art.
When an application is started, the stack includes an initial frame associated with the main function call of the application—typically named “main.” Each time a function is called, a new frame is created. Each time a function returns, the frame for that function invocation is removed. The frame being executed at a particular time is called the innermost frame. This is the most recently created of all the stack frames that still exist.
A stack trace (sometimes referred to as a “backtrace”) is a summary of how an application reached a particular state in terms of various functions being called. A stack trace generally shows one line of text per stack frame, starting with the currently executing frame (frame N), followed by frame N's caller (frame N−1), and so on up the stack.
The execution of a complex software application can generate a stack trace that contains tens or even hundreds of stack frames.